package cn.itcast.bos.Test;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.annotation.Rollback;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.transaction.annotation.Transactional;

import cn.itcast.bos.web.Dao.base.StandardRepository;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations="classpath:applicationContext.xml")
public class Test1 {

	@Autowired
	private StandardRepository  standardRepository;
	
	@Test
	public void demo1(){
		
/*		System.out.println(standardRepository.findByName("20公斤"));
*/			
		//System.out.println(standardRepository.queryName("20公斤"));
		
		
	}
	
	@Test
	@Transactional
	@Rollback(false)
	public void demo2(){
		standardRepository.updataStandard(99999,3);
	}
	
	
}
